package com.ysd.util;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;

import java.util.Date;

public final class CodeRoleUtils {
    //prefixType,prefixRule
    public static String getFixRoleText(String fixType, String fixRule, String ywz) {
        String fixRoleText = "";
        if(StringUtils.isNotBlank(fixType)){
            if(fixType.equals("gdz")){
                fixRoleText=fixRule;
            }else if(fixType.equals("rqz")){
                fixRoleText = DateUtil.format(new Date(),fixRule);
            }else if(fixType.equals("ywz")){
                fixRoleText = ywz;
            }

        }

        return fixRoleText;
    }
}
